<!-- navigator -->
<div id="nav">
<ul>
	<li><a href="#1"> <img src="/images/stats.jpg" /> <strong>Attacks you
	made</strong> </a></li>

	<li><a href="#2"> <img src="/images/army.png" /> <strong>Attacks
	against you</strong> </a></li>
	
</ul>
</div>


<script>$(function() {			$("#nav ul").tabs("#panes > div", {effect: 'fade', fadeOutSpeed: 400});});</script>
<!-- tab panes -->
<div id="panes">
<div>
<h3>Attacks you made</h3>
<?php
	echo '<div class="reports-list">';
	//table head - general information
	$html = '';
	$html .= '<div class="table-head">';
	$html .= '<span class="left count-row">#</span>';		
	$html .= '<span class="left">Date</span>';
	$html .= '<span class="left">Dominator</span>';
	$html .= '<span class="left">Result</span>';
	$html .= '<span class="left">Number of Raids</span>';
	$html .= '<span class="left">Coins</span>';
	$html .= '<span class="left">Experience</span>';
	$html .= '<span class="left">Attacker damage</span>';
	$html .= '<span class="left">Deffender damage</span>';
	$html .= '<span class="left nob">Units Lost</span>';
	$html .= '</div>';
	$html .= '</div>';
	echo $html;
?>
<p class="more">	
	
<?php
	$row_index = 0;
	ksort ( $this->offensiveReports );
	foreach ( $this->offensiveReports as $reports )
	{
		$row_index++;
		// create row for every player
		$html = '';
		$html .= '<p class="'. ( ($row_index % 2) ? 'odd' : 'even' ) .'">';
		$first = 0;
		foreach ( $reports as $key => $value ){
			$keyModify = str_replace ( '_', ' ', $key );
			$playerStatsName = ucwords ( $keyModify );
			$playerStatsValue = $value;
			if($first == 0 )
			{
				$first = 1;
				$html .= '<span class="left count-row">  </span>';	
			}
			$html .= '<span class="left">'. $playerStatsValue.'</span>';
			//echo '<p>';
			//echo $playerStatsName . ' : ' . $playerStatsValue;
			//echo '</p>';
		}
		$html .= '</p>';
		echo $html;
		
	}
?>
</p>			
</div>

<div>
<h3>Attacks against you</h3>
<p class="more">		
<?php
ksort ( $this->defensiveReports );
echo '<br/>';
foreach ( $this->offensiveReports as $reports )
	foreach ( $this->defensiveReports as $key => $value ) {
		$keyModify = str_replace ( '_', ' ', $key );
		$playerStatsName = ucwords ( $keyModify );
		$playerStatsValue = $value;
		echo '<p>';
		echo $playerStatsName . ' : ' . $playerStatsValue;
		echo '</p>';
	}
?>
</p>			
</div>


</div>
<br clear="all" />